#ifndef MISSION_H
#define MISSION_H

#include "procedure.h"
#include "QMap"


namespace IAlib
{

class  IA_LIBSHARED_EXPORT Mission
{
public:
    Mission();
    Mission(const Mission& mission);
    ~Mission();

    void setName(const QString& name) { m_name = name; }
    QString getName() const { return m_name; }

    void setImportance(const int imp) { m_importance = imp; }
    int getImportance() const { return m_importance; }

    QList<Procedure *> getProcedures() const { return m_procedures; }
    Procedure *        getProcedure(const QString& name);
    Procedure *        getBestProcedure();

    void addProcedure(const Procedure& procedure);
    void removeProcedure(const QString& name);

    QDomElement toXML(QDomDocument &doc);
    void        fromXML(QDomElement ele);

    Mission& operator=(const Mission& mission);

private:

    QString m_name;
    int     m_importance;
    bool    m_complete;

    QMap<QString, ItsAction*> m_actions;
    /* temporairement, en attedant la refonte total*/
    QList<Procedure*> m_procedures;
};


}
#endif // MISSION_H
